namespace Cik.Gapi4Net.Domain.Input
{
    using System.Text;
    using Contract;

    public class Image : EntityBase, IImage
    {
        // Safe type
        public string Safe { get; set; }

        // ImageSize type
        public string ImageSize { get; set; }

        // ImageColorization type
        public string ImageColorization { get; set; }

        // ImageColor type
        public string ImageColor { get; set; }

        // ImageType type
        public string ImageType { get; set; }

        // FileType type
        public string FileType { get; set; }

        // AsRight type
        public string AsRight { get; set; }

        public string SiteSearch { get; set; }

        public override string SearchWebUrl()
        {
            var builder = new StringBuilder();

            if (string.IsNullOrEmpty(Query) && string.IsNullOrEmpty(Version))
                return string.Empty;

            builder.AppendFormat("v={0}&q={1}", Version, Query);

            return builder.ToString();
        }
    }
}